package com.io;

//import com.sun.xml.internal.ws.util.ByteArrayBuffer;

import java.io.*;
import java.util.Arrays;

public class InOutFile {
    public static void main(String[] args) {
        try {
            InputStream in = new FileInputStream("out/readme1.txt");
            OutputStream out = new FileOutputStream("out/output.txt");
            int m;
            byte[] b = new byte[1024];
            while ((m = in.read(b)) != -1) {
                out.write(Arrays.copyOf(b, m));
            }
//            out.flush();
            in.close();
            out.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
